package com.briup.mybatis02code.mapper;

import com.briup.mybatis02code.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface UserMapper {
    @Select("select *  from t_user")
    List<User>  findAll();

    @Select("select * from t_user where id =#{id}")
    User findById(Integer id);

    void deleteById(Integer id);

    void  save(User user);

    void saveReturnId(User user);

    void saveReturnId2(User user);

    void  updateUser(User user);

    List<User> findByCondition(String name,short minAge);

}
